import { langKeysFigs, handlerGenerator } from "../api/keyWords";

const Router = require("koa-router");
import { getTest, getDBTest, p, selectFromDB, updateToDB } from "../api";

const router = new Router();

router.get("/test", getTest);
router.get("/db", getDBTest);
router.get("/", getTest);
router.get("/se", selectFromDB);
router.get("/update", updateToDB);
for (let keys in langKeysFigs) {
  router.get(`/keys/${keys}`, handlerGenerator(keys));
}

export { router };
